package com.wondersgroup.core.model;

import java.util.Date;
import javax.persistence.*;

public class Company {
    /**
     * ID
     */
    @Id
    @Column(name = "COMPANY_ID")
    private Integer companyId;

    @Column(name = "COMPANY_NAME")
    private String companyName;

    @Column(name = "COMPANY_NAME_ABBREV")
    private String companyNameAbbrev;

    @Column(name = "COMPANY_REG_ADDRESS")
    private String companyRegAddress;

    @Column(name = "COMPANY_BIZ_ADDRESS")
    private String companyBizAddress;

    @Column(name = "COMPANY_ORG_CODE")
    private String companyOrgCode;
    
    @Column(name = "ADMIN")
    private String contacts;
    
    @Column(name = "ADMIN_CONTACT")
    private String phone;

    public String getContacts() {
		return contacts;
	}

	public void setContacts(String contacts) {
		this.contacts = contacts;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	/**
     * ����ע���
     */
    @Column(name = "BIZ_CERT_NUMBER")
    private String bizCertNumber;

    /**
     * ����֤��
     */
    @Column(name = "CATERING_CERT")
    private String cateringCert;

    /**
     * ����֤��
     */
    @Column(name = "FOOD_CIRCU_CERT")
    private String foodCircuCert;

    /**
     * ����֤��
     */
    @Column(name = "FOOD_PROD_CERT")
    private String foodProdCert;

    @Column(name = "CERT_A")
    private String certA;

    @Column(name = "CERT_B")
    private String certB;

    /**
     * GIS���-����
     */
    @Column(name = "GIS_LONGITUDE")
    private String gisLongitude;

    /**
     * GIS���-γ��
     */
    @Column(name = "GIS_LATITUDE")
    private String gisLatitude;

    @Column(name = "REGION_PROVINCE")
    private Integer regionProvince;

    @Column(name = "REGION_CITY")
    private Integer regionCity;

    @Column(name = "REGION_COUNTY")
    private Integer regionCounty;

    @Column(name = "REGION_STREET")
    private Integer regionStreet;

    /**
     * ��ɾ���ֶΣ�
     */
    @Column(name = "COMPANY_STATUS")
    private Integer companyStatus;

    /**
     * 0��δ��ͨ
            1����(�ѿ�ͨ)
            2��ע��
            3����ͣ
     */
    @Column(name = "COMPANY_ACCOUNT_STATUS")
    private Integer companyAccountStatus;

    @Column(name="APP_ID")
    private String appId;
    
    @Column(name="APP_KEY")
    private String appKey;
    public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	public String getAppKey() {
		return appKey;
	}

	public void setAppKey(String appKey) {
		this.appKey = appKey;
	}

	/**
     * 0��ɾ��
     */
    @Column(name = "DEL_FLAG")
    private Integer delFlag;

    @Column(name = "CREATE_DATE")
    private Date createDate;

    @Column(name = "LAST_MODIFIED_DATE")
    private Date lastModifiedDate;
    
    @Column(name = "COMPANY_TYPE")
    private Integer companyType;

    public Integer getCompanyType() {
		return companyType;
	}

	public void setCompanyType(Integer companyType) {
		this.companyType = companyType;
	}

	/**
     * ��ȡID
     *
     * @return COMPANY_ID - ID
     */
    public Integer getCompanyId() {
        return companyId;
    }

    /**
     * ����ID
     *
     * @param companyId ID
     */
    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    /**
     * @return COMPANY_NAME
     */
    public String getCompanyName() {
        return companyName;
    }

    /**
     * @param companyName
     */
    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    /**
     * @return COMPANY_NAME_ABBREV
     */
    public String getCompanyNameAbbrev() {
        return companyNameAbbrev;
    }

    /**
     * @param companyNameAbbrev
     */
    public void setCompanyNameAbbrev(String companyNameAbbrev) {
        this.companyNameAbbrev = companyNameAbbrev;
    }

    /**
     * @return COMPANY_REG_ADDRESS
     */
    public String getCompanyRegAddress() {
        return companyRegAddress;
    }

    /**
     * @param companyRegAddress
     */
    public void setCompanyRegAddress(String companyRegAddress) {
        this.companyRegAddress = companyRegAddress;
    }

    /**
     * @return COMPANY_BIZ_ADDRESS
     */
    public String getCompanyBizAddress() {
        return companyBizAddress;
    }

    /**
     * @param companyBizAddress
     */
    public void setCompanyBizAddress(String companyBizAddress) {
        this.companyBizAddress = companyBizAddress;
    }

    /**
     * @return COMPANY_ORG_CODE
     */
    public String getCompanyOrgCode() {
        return companyOrgCode;
    }

    /**
     * @param companyOrgCode
     */
    public void setCompanyOrgCode(String companyOrgCode) {
        this.companyOrgCode = companyOrgCode;
    }

    /**
     * ��ȡ����ע���
     *
     * @return BIZ_CERT_NUMBER - ����ע���
     */
    public String getBizCertNumber() {
        return bizCertNumber;
    }

    /**
     * ���ù���ע���
     *
     * @param bizCertNumber ����ע���
     */
    public void setBizCertNumber(String bizCertNumber) {
        this.bizCertNumber = bizCertNumber;
    }

    /**
     * ��ȡ����֤��
     *
     * @return CATERING_CERT - ����֤��
     */
    public String getCateringCert() {
        return cateringCert;
    }

    /**
     * ���ò���֤��
     *
     * @param cateringCert ����֤��
     */
    public void setCateringCert(String cateringCert) {
        this.cateringCert = cateringCert;
    }

    /**
     * ��ȡ����֤��
     *
     * @return FOOD_CIRCU_CERT - ����֤��
     */
    public String getFoodCircuCert() {
        return foodCircuCert;
    }

    /**
     * ���ò���֤��
     *
     * @param foodCircuCert ����֤��
     */
    public void setFoodCircuCert(String foodCircuCert) {
        this.foodCircuCert = foodCircuCert;
    }

    /**
     * ��ȡ����֤��
     *
     * @return FOOD_PROD_CERT - ����֤��
     */
    public String getFoodProdCert() {
        return foodProdCert;
    }

    /**
     * ���ò���֤��
     *
     * @param foodProdCert ����֤��
     */
    public void setFoodProdCert(String foodProdCert) {
        this.foodProdCert = foodProdCert;
    }

    /**
     * @return CERT_A
     */
    public String getCertA() {
        return certA;
    }

    /**
     * @param certA
     */
    public void setCertA(String certA) {
        this.certA = certA;
    }

    /**
     * @return CERT_B
     */
    public String getCertB() {
        return certB;
    }

    /**
     * @param certB
     */
    public void setCertB(String certB) {
        this.certB = certB;
    }

    /**
     * ��ȡGIS���-����
     *
     * @return GIS_LONGITUDE - GIS���-����
     */
    public String getGisLongitude() {
        return gisLongitude;
    }

    /**
     * ����GIS���-����
     *
     * @param gisLongitude GIS���-����
     */
    public void setGisLongitude(String gisLongitude) {
        this.gisLongitude = gisLongitude;
    }

    /**
     * ��ȡGIS���-γ��
     *
     * @return GIS_LATITUDE - GIS���-γ��
     */
    public String getGisLatitude() {
        return gisLatitude;
    }

    /**
     * ����GIS���-γ��
     *
     * @param gisLatitude GIS���-γ��
     */
    public void setGisLatitude(String gisLatitude) {
        this.gisLatitude = gisLatitude;
    }

    /**
     * @return REGION_PROVINCE
     */
    public Integer getRegionProvince() {
        return regionProvince;
    }

    /**
     * @param regionProvince
     */
    public void setRegionProvince(Integer regionProvince) {
        this.regionProvince = regionProvince;
    }

    /**
     * @return REGION_CITY
     */
    public Integer getRegionCity() {
        return regionCity;
    }

    /**
     * @param regionCity
     */
    public void setRegionCity(Integer regionCity) {
        this.regionCity = regionCity;
    }

    /**
     * @return REGION_COUNTY
     */
    public Integer getRegionCounty() {
        return regionCounty;
    }

    /**
     * @param regionCounty
     */
    public void setRegionCounty(Integer regionCounty) {
        this.regionCounty = regionCounty;
    }

    /**
     * @return REGION_STREET
     */
    public Integer getRegionStreet() {
        return regionStreet;
    }

    /**
     * @param regionStreet
     */
    public void setRegionStreet(Integer regionStreet) {
        this.regionStreet = regionStreet;
    }

    /**
     * ��ȡ��ɾ���ֶΣ�
     *
     * @return COMPANY_STATUS - ��ɾ���ֶΣ�
     */
    public Integer getCompanyStatus() {
        return companyStatus;
    }

    /**
     * ���ô�ɾ���ֶΣ�
     *
     * @param companyStatus ��ɾ���ֶΣ�
     */
    public void setCompanyStatus(Integer companyStatus) {
        this.companyStatus = companyStatus;
    }

    /**
     * ��ȡ0��δ��ͨ
            1����(�ѿ�ͨ)
            2��ע��
            3����ͣ
     *
     * @return COMPANY_ACCOUNT_STATUS - 0��δ��ͨ
            1����(�ѿ�ͨ)
            2��ע��
            3����ͣ
     */
    public Integer getCompanyAccountStatus() {
        return companyAccountStatus;
    }

    /**
     * ����0��δ��ͨ
            1����(�ѿ�ͨ)
            2��ע��
            3����ͣ
     *
     * @param companyAccountStatus 0��δ��ͨ
            1����(�ѿ�ͨ)
            2��ע��
            3����ͣ
     */
    public void setCompanyAccountStatus(Integer companyAccountStatus) {
        this.companyAccountStatus = companyAccountStatus;
    }

    /**
     * ��ȡ0��ɾ��
     *
     * @return DEL_FLAG - 0��ɾ��
     */
    public Integer getDelFlag() {
        return delFlag;
    }

    /**
     * ����0��ɾ��
     *
     * @param delFlag 0��ɾ��
     */
    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    /**
     * @return CREATE_DATE
     */
    public Date getCreateDate() {
        return createDate;
    }

    /**
     * @param createDate
     */
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    /**
     * @return LAST_MODIFIED_DATE
     */
    public Date getLastModifiedDate() {
        return lastModifiedDate;
    }

    /**
     * @param lastModifiedDate
     */
    public void setLastModifiedDate(Date lastModifiedDate) {
        this.lastModifiedDate = lastModifiedDate;
    }

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((bizCertNumber == null) ? 0 : bizCertNumber.hashCode());
		result = prime * result
				+ ((cateringCert == null) ? 0 : cateringCert.hashCode());
		result = prime * result + ((certA == null) ? 0 : certA.hashCode());
		result = prime * result + ((certB == null) ? 0 : certB.hashCode());
		result = prime
				* result
				+ ((companyAccountStatus == null) ? 0 : companyAccountStatus
						.hashCode());
		result = prime
				* result
				+ ((companyBizAddress == null) ? 0 : companyBizAddress
						.hashCode());
		result = prime * result
				+ ((companyId == null) ? 0 : companyId.hashCode());
		result = prime * result
				+ ((companyName == null) ? 0 : companyName.hashCode());
		result = prime
				* result
				+ ((companyNameAbbrev == null) ? 0 : companyNameAbbrev
						.hashCode());
		result = prime * result
				+ ((companyOrgCode == null) ? 0 : companyOrgCode.hashCode());
		result = prime
				* result
				+ ((companyRegAddress == null) ? 0 : companyRegAddress
						.hashCode());
		result = prime * result
				+ ((companyStatus == null) ? 0 : companyStatus.hashCode());
		result = prime * result
				+ ((createDate == null) ? 0 : createDate.hashCode());
		result = prime * result + ((delFlag == null) ? 0 : delFlag.hashCode());
		result = prime * result
				+ ((foodCircuCert == null) ? 0 : foodCircuCert.hashCode());
		result = prime * result
				+ ((foodProdCert == null) ? 0 : foodProdCert.hashCode());
		result = prime * result
				+ ((gisLatitude == null) ? 0 : gisLatitude.hashCode());
		result = prime * result
				+ ((gisLongitude == null) ? 0 : gisLongitude.hashCode());
		result = prime
				* result
				+ ((lastModifiedDate == null) ? 0 : lastModifiedDate.hashCode());
		result = prime * result
				+ ((regionCity == null) ? 0 : regionCity.hashCode());
		result = prime * result
				+ ((regionCounty == null) ? 0 : regionCounty.hashCode());
		result = prime * result
				+ ((regionProvince == null) ? 0 : regionProvince.hashCode());
		result = prime * result
				+ ((regionStreet == null) ? 0 : regionStreet.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Company other = (Company) obj;
		if (bizCertNumber == null) {
			if (other.bizCertNumber != null)
				return false;
		} else if (!bizCertNumber.equals(other.bizCertNumber))
			return false;
		if (cateringCert == null) {
			if (other.cateringCert != null)
				return false;
		} else if (!cateringCert.equals(other.cateringCert))
			return false;
		if (certA == null) {
			if (other.certA != null)
				return false;
		} else if (!certA.equals(other.certA))
			return false;
		if (certB == null) {
			if (other.certB != null)
				return false;
		} else if (!certB.equals(other.certB))
			return false;
		if (companyAccountStatus == null) {
			if (other.companyAccountStatus != null)
				return false;
		} else if (!companyAccountStatus.equals(other.companyAccountStatus))
			return false;
		if (companyBizAddress == null) {
			if (other.companyBizAddress != null)
				return false;
		} else if (!companyBizAddress.equals(other.companyBizAddress))
			return false;
		if (companyId == null) {
			if (other.companyId != null)
				return false;
		} else if (!companyId.equals(other.companyId))
			return false;
		if (companyName == null) {
			if (other.companyName != null)
				return false;
		} else if (!companyName.equals(other.companyName))
			return false;
		if (companyNameAbbrev == null) {
			if (other.companyNameAbbrev != null)
				return false;
		} else if (!companyNameAbbrev.equals(other.companyNameAbbrev))
			return false;
		if (companyOrgCode == null) {
			if (other.companyOrgCode != null)
				return false;
		} else if (!companyOrgCode.equals(other.companyOrgCode))
			return false;
		if (companyRegAddress == null) {
			if (other.companyRegAddress != null)
				return false;
		} else if (!companyRegAddress.equals(other.companyRegAddress))
			return false;
		if (companyStatus == null) {
			if (other.companyStatus != null)
				return false;
		} else if (!companyStatus.equals(other.companyStatus))
			return false;
		if (createDate == null) {
			if (other.createDate != null)
				return false;
		} else if (!createDate.equals(other.createDate))
			return false;
		if (delFlag == null) {
			if (other.delFlag != null)
				return false;
		} else if (!delFlag.equals(other.delFlag))
			return false;
		if (foodCircuCert == null) {
			if (other.foodCircuCert != null)
				return false;
		} else if (!foodCircuCert.equals(other.foodCircuCert))
			return false;
		if (foodProdCert == null) {
			if (other.foodProdCert != null)
				return false;
		} else if (!foodProdCert.equals(other.foodProdCert))
			return false;
		if (gisLatitude == null) {
			if (other.gisLatitude != null)
				return false;
		} else if (!gisLatitude.equals(other.gisLatitude))
			return false;
		if (gisLongitude == null) {
			if (other.gisLongitude != null)
				return false;
		} else if (!gisLongitude.equals(other.gisLongitude))
			return false;
		if (lastModifiedDate == null) {
			if (other.lastModifiedDate != null)
				return false;
		} else if (!lastModifiedDate.equals(other.lastModifiedDate))
			return false;
		if (regionCity == null) {
			if (other.regionCity != null)
				return false;
		} else if (!regionCity.equals(other.regionCity))
			return false;
		if (regionCounty == null) {
			if (other.regionCounty != null)
				return false;
		} else if (!regionCounty.equals(other.regionCounty))
			return false;
		if (regionProvince == null) {
			if (other.regionProvince != null)
				return false;
		} else if (!regionProvince.equals(other.regionProvince))
			return false;
		if (regionStreet == null) {
			if (other.regionStreet != null)
				return false;
		} else if (!regionStreet.equals(other.regionStreet))
			return false;
		return true;
	}
    
}